﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Architecture.CrossCutting.RepositoryPattern.Specification;

namespace Architecture.CrossCutting.LoggingEntities.Specifications
{
    public static class LogSpecifications
    {
        public static Specification<Log> Today
        {
            get
            {
                return new DirectSpecification<Log>(l => l.CreationDate >= DateTime.Today);
            }
        }

        public static Specification<Log> TestLog
        {
            get
            {
                return new DirectSpecification<Log>(l => l.Function.Equals("TestLog", StringComparison.InvariantCultureIgnoreCase));
            }
        }

        public static Specification<Log> TodayTestLog
        {
            get
            {
                return LogSpecifications.TestLog & LogSpecifications.Today;
            }
        }


    }
}
